package com.sc.VenusQueryBeta.model.account.xiaofei;

import com.hengjun.kingstar.sdk.base.BaseModel;
import com.hengjun.kingstar.sdk.helper.RetrofitCreateHelper;
import com.hengjun.kingstar.sdk.helper.RxHelper;
import com.sc.VenusQueryBeta.api.Host;
import com.sc.VenusQueryBeta.api.account.AccountApi;
import com.sc.VenusQueryBeta.contract.account.xiaofei.XiaoFei02Contract;
import com.sc.VenusQueryBeta.model.bean.account.CurrencyListBean;
import com.sc.VenusQueryBeta.model.bean.account.xiaofei.XiaoFei02Bean;

import io.reactivex.Observable;

/**
 * Created by Administrator on 19/10/2018.
 *
 */

public class XiaoFei2Model extends BaseModel implements XiaoFei02Contract.IXiaoFei2Model{
    @Override
    public Observable<XiaoFei02Bean> getXiaoFei2(String serverAddress, String projectName, int serverPort, int clientindex, int start, int limit, String clientAppmsgnum, String roomth, String roomyear, int roomid, String currency) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base+serverAddress+":"+serverPort+"/"+projectName+"/").
                queryXiaoFei02(roomth,roomyear,start,limit,clientindex,clientAppmsgnum,roomid,currency).compose(RxHelper.<XiaoFei02Bean>rxSchedulerHelper());
    }


    //查询币种
    @Override
    public Observable<CurrencyListBean> queryAllCurrencyList(String serverAddress, String projectName, int serverPort) {
        return RetrofitCreateHelper.createApi(AccountApi.class, Host.base + serverAddress + ":" + serverPort + "/" + projectName + "/").queryCurrencyList().compose(RxHelper.<CurrencyListBean>rxSchedulerHelper());

    }

    public  static  XiaoFei2Model newInstance() {
        return new XiaoFei2Model();
    }
}
